import com.vhly.util.DeviceInfo;

import javax.microedition.io.Connector;
import javax.microedition.io.HttpConnection;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Vector;

public final class cls_q extends cls_w
        implements Runnable {

    private static int fld_g_int_A2[][] = {
            {
                    0, 0, 0, 0, 0, 0
            }, {
                    5, 5, 5, 5, 5, 5
            }, {
                    1, 0, 0, 0, 0, 0
            }, {
                    0, 1, 0, 0, 0, 0
            }, {
                    0, 0, 1, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 1, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 3, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 1
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 3, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 1, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }, {
                    0, 0, 0, 0, 0, 0
            }
    };
    cls_d a;
    private cls_d h;
    cls_d fld_b_d;
    private cls_d i;
    private cls_d j;
    private int k;
    private String l;
    private String m;
    private String n;
    private String o;
    private String p;
    private String q;
    private String r;
    private String s;
    String c[][];
    String d[][];
    private int t;
    private int u;
    private int v;
    private int w;
    private long x;
    private Thread y;
    private String z;
    private String A;
    private String B;
    private cls_g C;
    private String D;
    private String E;
    private String F;
    private String G[][];
    private String ao[][];
    private boolean ap;
    Image img104;
    Image img105;
    private Image aq;

    cls_q(MainThread thread) {
        super(thread);
        super.K = 27;
        super.L = 75;
        E = "sporenation831127911469110651167311178";
        D = E;
        C = new cls_g(E);
        thread.a();
        img104 = MainThread.loadUnencodeImage(104);
        img105 = MainThread.loadUnencodeImage(105);
        thread.a();
        i();
        thread.a();
    }

    static void a(String as[][], String as1[][]) {
        for (int i1 = 0; i1 < as.length; i1++) {
            as1[i1] = new String[as[i1].length];
            System.arraycopy(as[i1], 0, as1[i1], 0, as[i1].length);
        }

    }

    final void a_(int i1) {

        switch (i1) {
            case 5:
                if (super.mainThread.aW)
                    if (d == null) {
                        super.I.b[8].c = 3;
                        if (super.mainThread.aX) {
                            e(106);
                            return;
                        }
                        if (d == null) {
                            cls_h hi1 = new cls_h(super.mainThread, (short) 5, (short) 7, (short) 6, (short) 4, 2);
                            super.I.a(hi1);
                            return;
                        } else {
                            a(8, d);
                            super.I.a(8);
                            return;
                        }
                    } else {
                        super.I.b[8].c = 3;
                        a(8, d);
                        super.I.a(8);
                        return;
                    }
                l = null;
                m = null;
                if (super.mainThread.co.isEmpty()) {
                    cls_h hi1 = new cls_h(super.mainThread, (short) 5, (short) 7, (short) 6, (short) 4, 2);
                    super.I.a(hi1);
                    return;
                } else {
                    n();
                    super.I.b[8].c = 3;
                    a(8, d);
                    super.I.a(8);
                    return;
                }

            case 6:
                if (super.mainThread.co.size() >= 15) {
                    String[] sai1 = new String[2];
                    sai1[0] = super.mainThread.strs[104];
                    sai1[1] = super.mainThread.strs[103];
                    super.I.b[28].a(i1);
                    super.I.a(28);
                    return;
                }
                for (i1 = 0; i1 < 6; i1++) {
                    super.I.b[34].B[i1] = new char[10];
                    for (int j1 = 0; j1 < 10; j1++)
                        super.I.b[34].B[i1][j1] = '.';

                }

                super.I.a(74);
                return;
            case 9:
                super.I.b[34].c = 0;
                super.I.a(34);
                String si1 = d[4][super.mainThread.ao];
                for (int k1 = 0; k1 < 6; k1++) {
                    super.I.b[34].B[k1] = new char[10];
                    for (int l1 = 0; l1 < 10; l1++)
                        super.I.b[34].B[k1][l1] = si1.charAt(k1 * 10 + l1);

                }

                return;

            case 17:
                e(125);
                return;
            case 19:
                super.I.a(51);
                return;
            case 21:
                e(112);
                return;
            case 22:
                if (super.mainThread.aW) {
                    if (ap) {
                        l = super.mainThread.j();
                        m = super.mainThread.j();
                        super.mainThread.T = super.mainThread.j(6) * 3;
                        m();
                        return;
                    }
                    super.I.b[8].c = 4;
                    if (super.mainThread.aX) {
                        e(106);
                        return;
                    }
                    if (d == null) {
                        cls_h hi1 = new cls_h(super.mainThread, (short) 5, (short) 7, (short) 6, (short) 4, 2);
                        super.I.a(hi1);
                        return;
                    } else {
                        a(8, d);
                        super.I.a(8);
                        return;
                    }
                }

                if (!super.mainThread.co.isEmpty()) {
                    l = (String) super.mainThread.co.elementAt(super.mainThread.j(super.mainThread.co.size()));
                    if (super.mainThread.co.size() > 1) {
                        m = (String) super.mainThread.co.elementAt(super.mainThread.j(super.mainThread.co.size()));
                    } else {
                        m = super.mainThread.j();
                    }
                } else {
                    l = super.mainThread.j();
                    m = super.mainThread.j();
                }
                n = super.mainThread.strs[48];
                super.mainThread.T = super.mainThread.j(6) * 3;
                m();
                return;
            case 23:
                if (super.I.a.a == 39) {
                    super.I.b[54].c = 21;
                    if (super.mainThread.aY) {
                        e(122);
                        return;
                    }
                    if (c == null) {
                        cls_h hi1 = new cls_h(super.mainThread, (short) 23, (short) 77, (short) 6, (short) 4, 2);
                        super.I.a(hi1);
                        return;
                    } else {
                        a(54, c);
                        super.I.a(54);
                        return;
                    }
                }
                if (d == null) {
                    cls_h hi1 = new cls_h(super.mainThread, (short) 5, (short) 7, (short) 6, (short) 4, 2);
                    super.I.a(hi1);
                    return;
                }
                super.I.b[54].c = 20;
                if (super.mainThread.aY) {
                    e(122);
                    return;
                }
                if (c == null) {
                    cls_h hi1 = new cls_h(super.mainThread, (short) 23, (short) 77, (short) 6, (short) 4, 2);
                    super.I.a(hi1);
                    return;
                } else {
                    a(54, c);
                    super.I.a(54);
                    return;
                }
            case 25:
                super.mainThread.aV = 0;
                e(110);
                return;
            case 26:
                super.I.a(52);
                return;
            case 28:
                a(true);
                super.mainThread.k(4);
                return;
            case 40:
                if (super.mainThread.aW) {
                    super.I.a(50);
                    return;
                }
                l = null;
                m = null;
                n();
                if (super.I.a.v[super.I.a.e] == 40)
                    l = d[4][super.mainThread.ao];
                super.I.b[31].c = 6;
                a(31, d);
                super.I.a(31);
                return;
            case 49:
                super.mainThread.aV = 0;
                e(117);
                return;
            case 50:
                super.mainThread.J = true;
                e(118);
                return;
            case 51:
                super.I.b[47].B[0] = new char[16];
                super.I.a(47);
                super.I.b[47].a(super.mainThread.a(d[4][super.mainThread.ao]));
                return;
            case 67:
                e(107);
                return;
            case 74:
                super.I.b[58].a(c[1][super.I.b[54].e]);
                super.I.a(58);
                return;
            case 84:
                A = super.I.b[54].w[super.I.b[54].e];
                ao = null;
                e(109);
                return;
            case 86:
                if (d[0].length > 1)
                    super.I.b[29].v[0] = 87;
                else
                    super.I.b[29].v[0] = 89;
                super.I.b[29].c = 9;
                super.I.a(29);
                return;
            case 93:
                if (super.mainThread.recordManager.H.length() == 0) {
                    super.I.a(70);
                    super.I.b[70].c = 31;
                    return;
                } else {
                    super.I.a(71);
                    return;
                }
            case 99:
                super.I.a(70);
                super.I.b[70].c = 30;
                return;
            case 105:
                super.I.a(42);
                return;
            case 106:
                super.I.e();
                return;
            case 107:
                if (super.mainThread.recordManager.K) {
                    if ((i1 = super.mainThread.recordManager.z.indexOf('@')) != -1) {
                        super.I.b[41].a(0, super.mainThread.recordManager.z.substring(0, i1), 64);
                        super.I.b[41].a(1, super.mainThread.recordManager.z.substring(i1 + 1, super.mainThread.recordManager.z.length()), 64);
                        super.I.b[41].a(2, super.mainThread.recordManager.x, 16);
                    }
                } else {
                    super.I.b[41].a(0, "", 64);
                    super.I.b[41].a(1, "", 64);
                    super.I.b[41].a(2, "", 16);
                }
                super.I.a(41);
                return;
            case 108:
                super.I.b[43].a(0, "", 64);
                super.I.b[43].a(1, "", 64);
                super.I.a(61, true);
                return;
            case 126:
            case 127:
            case 128:
            case 129:
                super.mainThread.aV = 0;
                e(111);
                return;
            default:
                super.a_(i1);
                return;
        }

//
//           goto _L1 _L2 _L3 _L1 _L1 _L4 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L5 _L1 _L6 _L1 _L7 _L8 _L9 _L1 _L10 _L11 _L1 _L12 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L13 _L1 _L1 _L1 _L1 _L14 _L1 _L1 _L1 _L15 _L16 _L17 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L18 _L1 _L1 _L1 _L1 _L1 _L1 _L19 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L20 _L1 _L21 _L1 _L1 _L1 _L1 _L1 _L1 _L22 _L1 _L1 _L1 _L1 _L1 _L23 _L1 _L1 _L1 _L1 _L1 _L24 _L25 _L26 _L27 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L1 _L28 _L28 _L28 _L28
//               //     5   6   7   8   9  10   11  12  13 14  15  16  17 18   19  20  21  22  23  24  25   26   27   28  29  30  31  32  33  34  35  36  37  38  39   40  41  42  43  44  45   46  47  48  49   50   51   52  53  54  55  56  57  58  59  60  61  62  63  64  65  66   67  68  69  70  71  72  73   74  75  76  77  78  79  80  81  82  83  84        86                          93                        99                      105  106  107  108                                                                       126
//
//
//
//
//_L3:
//        if(super.mainThread.co.size() >= 15)
//        {
//            (i1 = new String[2])[0] = super.mainThread.strs[104];
//            i1[1] = super.mainThread.strs[103];
//            super.I.b[28].a(i1);
//            super.I.a(28);
//            return;
//        }
//        for(i1 = 0; i1 < 6; i1++)
//        {
//            super.I.b[34].B[i1] = new char[10];
//            for(int j1 = 0; j1 < 10; j1++)
//                super.I.b[34].B[i1][j1] = '.';
//
//        }
//
//        super.I.a(74);
//        return;
//_L8:
//        if(super.mainThread.aW)
//        {
//            if(ap)
//            {
//                l = super.mainThread.j();
//                m = super.mainThread.j();
//                super.mainThread.T = super.mainThread.j(6) * 3;
//                m();
//                return;
//            }
//            super.I.b[8].c = 4;
//            if(super.mainThread.aX)
//            {
//                e(106);
//                return;
//            }
//            if(d == null)
//            {
//                h hi1 = new h(super.mainThread, (short)5, (short)7, (short)6, (short)4, 2);
//                super.I.a(hi1);
//                return;
//            } else
//            {
//                a(8, d);
//                super.I.a(8);
//                return;
//            }
//        }
//
//        if(!super.mainThread.co.isEmpty()){
//            l = (String)super.mainThread.co.elementAt(super.mainThread.j(super.mainThread.co.size()));
//            if(super.mainThread.co.size() > 1){
//                m = (String)super.mainThread.co.elementAt(super.mainThread.j(super.mainThread.co.size()));
//            }else{
//                m = super.mainThread.j();
//            }
//        }else{
//            l = super.mainThread.j();
//            m = super.mainThread.j();
//        }
//
//        if(!super.mainThread.co.isEmpty()) goto _L30; else goto _L29
//_L29:
//        l = super.mainThread.j();
//          goto _L31
//_L30:
//        l = (String)super.mainThread.co.elementAt(super.mainThread.j(super.mainThread.co.size()));
//        if(super.mainThread.co.size() > 1){
////            goto _L31; else goto _L32
////_L32:
//        m = (String)super.mainThread.co.elementAt(super.mainThread.j(super.mainThread.co.size()));
//        }else{
////          goto _L33
////_L31:
//        m = super.mainThread.j();
//        }
//_L33:
//        n = super.mainThread.strs[48];
//        super.mainThread.T = super.mainThread.j(6) * 3;
//        m();
//        return;
//_L13:
//        if(super.mainThread.aW)
//        {
//            super.I.a(50);
//            return;
//        }
//        l = null;
//        m = null;
//        n();
//        if(super.I.a.v[super.I.a.e] == 40)
//            l = d[4][super.mainThread.ao];
//        super.I.b[31].c = 6;
//        a(31, d);
//        super.I.a(31);
//        return;
//_L16:
//        super.mainThread.J = true;
//        e(118);
//        return;
//_L11:
//        super.I.a(52);
//        return;
//_L15:
//        super.mainThread.aV = 0;
//        e(117);
//        return;
//_L10:
//        super.mainThread.aV = 0;
//        e(110);
//        return;
//_L26:
//        if(super.mainThread.i.K)
//        {
//            if((i1 = super.mainThread.i.z.indexOf('@')) != -1)
//            {
//                super.I.b[41].a(0, super.mainThread.i.z.substring(0, i1), 64);
//                super.I.b[41].a(1, super.mainThread.i.z.substring(i1 + 1, super.mainThread.i.z.length()), 64);
//                super.I.b[41].a(2, super.mainThread.i.x, 16);
//            }
//        } else
//        {
//            super.I.b[41].a(0, "", 64);
//            super.I.b[41].a(1, "", 64);
//            super.I.b[41].a(2, "", 16);
//        }
//        super.I.a(41);
//        return;
//_L27:
//        super.I.b[43].a(0, "", 64);
//        super.I.b[43].a(1, "", 64);
//        super.I.a(61, true);
//        return;
//_L5:
//        e(125);
//        return;
//_L6:
//        super.I.a(51);
//        return;
//_L28:
//        super.mainThread.aV = 0;
//        e(111);
//        return;
//_L7:
//        e(112);
//        return;
//_L14:
//        super.mainThread.aV = 0;
//        G = null;
//        e(116);
//        return;
//_L12:
//        a(true);
//        super.mainThread.strs(4);
//        return;
//_L9:
//        if(super.I.a.a == 39)
//        {
//            super.I.b[54].c = 21;
//            if(super.mainThread.aY)
//            {
//                e(122);
//                return;
//            }
//            if(c == null)
//            {
//                h hi1 = new h(super.mainThread, (short)23, (short)77, (short)6, (short)4, 2);
//                super.I.a(hi1);
//                return;
//            } else
//            {
//                a(54, c);
//                super.I.a(54);
//                return;
//            }
//        }
//        if(d == null)
//        {
//            h hi1 = new h(super.mainThread, (short)5, (short)7, (short)6, (short)4, 2);
//            super.I.a(hi1);
//            return;
//        }
//        super.I.b[54].c = 20;
//        if(super.mainThread.aY)
//        {
//            e(122);
//            return;
//        }
//        if(c == null)
//        {
//            h hi1 = new h(super.mainThread, (short)23, (short)77, (short)6, (short)4, 2);
//            super.I.a(hi1);
//            return;
//        } else
//        {
//            a(54, c);
//            super.I.a(54);
//            return;
//        }
//_L19:
//        super.I.b[58].a(c[1][super.I.b[54].e]);
//        super.I.a(58);
//        return;
//_L20:
//        A = super.I.b[54].w[super.I.b[54].e];
//        ao = null;
//        e(109);
//        return;
//_L18:
//        e(107);
//        return;
//_L17:
//        super.I.b[47].B[0] = new char[16];
//        super.I.a(47);
//        super.I.b[47].a(super.mainThread.a(d[4][super.mainThread.ao]));
//        return;
//_L23:
//        super.I.a(70);
//        super.I.b[70].c = 30;
//        return;
//_L22:
//        if(super.mainThread.i.mainThread.length() == 0)
//        {
//            super.I.a(70);
//            super.I.b[70].c = 31;
//            return;
//        } else
//        {
//            super.I.a(71);
//            return;
//        }
//_L2:
//        if(super.mainThread.aW)
//            if(d == null)
//            {
//                super.I.b[8].c = 3;
//                if(super.mainThread.aX)
//                {
//                    e(106);
//                    return;
//                }
//                if(d == null)
//                {
//                    i1 = new h(super.mainThread, (short)5, (short)7, (short)6, (short)4, 2);
//                    super.I.a(i1);
//                    return;
//                } else
//                {
//                    a(8, d);
//                    super.I.a(8);
//                    return;
//                }
//            } else
//            {
//                super.I.b[8].c = 3;
//                a(8, d);
//                super.I.a(8);
//                return;
//            }
//        l = null;
//        m = null;
//        if(super.mainThread.co.isEmpty())
//        {
//            i1 = new h(super.mainThread, (short)5, (short)7, (short)6, (short)4, 2);
//            super.I.a(i1);
//            return;
//        } else
//        {
//            n();
//            super.I.b[8].c = 3;
//            a(8, d);
//            super.I.a(8);
//            return;
//        }
//_L21:
//        if(d[0].length > 1)
//            super.I.b[29].v[0] = 87;
//        else
//            super.I.b[29].v[0] = 89;
//        super.I.b[29].c = 9;
//        super.I.a(29);
//        return;
//_L4:
//        super.I.b[34].c = 0;
//        super.I.a(34);
//        i1 = d[4][super.mainThread.ao];
//        for(int k1 = 0; k1 < 6; k1++)
//        {
//            super.I.b[34].B[k1] = new char[10];
//            for(int l1 = 0; l1 < 10; l1++)
//                super.I.b[34].B[k1][l1] = i1.charAt(k1 * 10 + l1);
//
//        }
//
//        return;
//_L24:
//        super.I.a(42);
//        return;
//_L25:
//        super.I.e();
//        return;
//_L1:
//        super.a_(i1);
//        return;
    }

    final void b(int i1, int j1) {
        String sj1;
        String si1;
        if ((i1 & 0x20000) != 0 || (i1 & 0x1020) != 0) {
            if ((super.I.a.fld_b_int == 9 || super.I.a.fld_b_int == 6 && super.I.a.c == 2) && (i1 & 0x1000) != 0) {
                super.I.a.c(i1);
                q();
                return;
            }
            if (super.mainThread.aU)
                return;
            switch (j1) {
                case 29:
                    if (super.mainThread.aW) {
                        if (super.mainThread.ao < d[0].length) {
                            e(102);
                            return;
                        } else {
                            super.I.b(30);
                            super.mainThread.co.removeElementAt(super.mainThread.ao - d[0].length);
                            super.mainThread.recordManager.g();
                            return;
                        }
                    } else {
                        super.I.b(30);
                        super.mainThread.co.removeElementAt(super.mainThread.ao);
                        super.mainThread.cp.removeElementAt(super.mainThread.ao);
                        super.mainThread.recordManager.g();
                        n();
                        return;
                    }

                case 30: // '\036'
                    super.I.b(0);
                    if (super.mainThread.aW) {
                        if (super.I.b[29].c == 11)
                            if (super.mainThread.co.size() + (d == null ? 0 : d[0].length) > 15) {
                                l();
                                return;
                            } else {
                                e(103);
                                return;
                            }
                        if (super.I.b[29].c == 9) {
                            super.I.a(39);
                            if (d != null) {
                                a(8, d);
                                super.I.a(8);
                                return;
                            }
                        }
                    } else {
                        super.I.a(67);
                        if (!super.mainThread.co.isEmpty()) {
                            a(8, d);
                            super.I.a(8);
                            return;
                        }
                    }
                    break;

                case 35:
                    if (super.I.b[35].c != 27) {
                        super.I.b[8].c = 5;
                        m = ao[4][super.mainThread.ao];
                        p = ao[0][super.mainThread.ao];
                        q = ao[1][super.mainThread.ao];
                        n = ao[2][super.mainThread.ao];
                        if (super.mainThread.aX) {
                            e(106);
                            return;
                        }
                        if (d == null) {
                            cls_h hi1 = new cls_h(super.mainThread, (short) 5, (short) 7, (short) 6, (short) 4, 2);
                            super.I.a(hi1);
                            return;
                        }
                        if (super.mainThread.recordManager.H.compareTo(ao[1][super.mainThread.ao]) == 0) {
                            cls_h hi1 = new cls_h(super.mainThread, (short) 5, (short) 90, (short) 6, (short) 4, 2);
                            super.I.a(hi1);
                            return;
                        } else {
                            a(8, d);
                            super.I.a(8);
                            return;
                        }
                    }
                    break;

                case 31:
                    super.mainThread.ao = super.I.a.i * 7 + super.I.a.e;
                    if (super.mainThread.aW) {
                        super.I.a(35, true);
                        super.I.b[35].c = 28;
                        super.I.b[35].fld_q_short = 5;
                        si1 = ao[3][super.mainThread.ao].trim();
                        j1 = 4;
                        if (si1.length() > 0)
                            j1++;
                        String as[] = new String[j1];
                        int k2 = 0;
                        k2++;
                        as[0] = ao[8][super.mainThread.ao];
                        k2++;
                        as[1] = ao[6][super.mainThread.ao];
                        k2++;
                        as[2] = ao[7][super.mainThread.ao];
                        if (si1.length() > 0) {
                            k2++;
                            as[3] = si1;
                        }
                        as[k2] = ao[2][super.mainThread.ao];
                        super.I.b[35].a(as);
                        super.I.b[35].v[0] = (short) (si1.length() <= 0 ? 69 : 68);
                        super.I.b[35].a(super.mainThread.a(ao[4][super.mainThread.ao]));
                        return;
                    } else {
                        m = d[4][super.mainThread.ao];
                        n = super.mainThread.strs[48];
                        super.I.a(33);
                        return;
                    }

                case 63: // '?'
                    super.I.b(0);
                    super.I.a(40);
                    super.I.a(41);
                    if ((i1 = super.mainThread.recordManager.z.indexOf('@')) != -1) {
                        super.I.b[41].a(0, super.mainThread.recordManager.z.substring(0, i1), 64);
                        super.I.b[41].a(1, super.mainThread.recordManager.z.substring(i1 + 1, super.mainThread.recordManager.z.length()), 64);
                        super.I.b[41].a(2, super.mainThread.recordManager.x, 16);
                    }
                    return;

                case 32:
                    super.mainThread.ao = super.I.a.i * 7 + super.I.a.e;
                    super.I.a(35, true);
                    super.I.b[35].c = 29;
                    super.I.b[35].fld_q_short = 5;
                    si1 = ao[3][super.mainThread.ao].trim();
                    j1 = 4;
                    if (si1.length() > 0)
                        j1++;
                    String as1[] = new String[j1];
                    int l2 = 0;
                    l2++;
                    as1[0] = ao[8][super.mainThread.ao];
                    l2++;
                    as1[1] = ao[6][super.mainThread.ao];
                    l2++;
                    as1[2] = ao[7][super.mainThread.ao];
                    if (si1.length() > 0) {
                        l2++;
                        as1[3] = si1;
                    }
                    as1[l2] = ao[2][super.mainThread.ao];
                    super.I.b[35].a(as1);
                    super.I.b[35].v[0] = (short) (si1.length() <= 0 ? 69 : 68);
                    super.I.b[35].a(super.mainThread.a(ao[4][super.mainThread.ao]));
                    return;

                case 41: // ')'
                case 44:
                    if (j1 == 41) {
                        super.mainThread.recordManager.z = (new String(super.I.a.B[0])).trim() + "@";
                        super.mainThread.recordManager.z += (new String(super.I.a.B[1])).trim();
                        super.mainThread.recordManager.x = (new String(super.I.a.B[2])).trim();
                    } else {
                        super.mainThread.recordManager.x = (new String(super.I.a.B[0])).trim();
                    }
                    if (j1 == 41 && (!k() || (new String(super.I.a.B[0])).trim().length() == 0 || (new String(super.I.a.B[1])).trim().length() == 0)) {
                        cls_h hi1 = new cls_h(super.mainThread, (short) 33, (short) 42, (short) 6, (short) 4, 2);
                        super.I.a(hi1);
                    } else if (j1 == 44 && super.I.a.v[super.I.a.e] == 116)
                        super.mainThread.K.e(126);
                    else if (super.mainThread.recordManager.x.length() < 4) {
                        cls_h hi1 = new cls_h(super.mainThread, (short) 20, (short) 41, (short) 6, (short) 4, 2);
                        String[] saj1 = new String[2];
                        (saj1)[0] = super.mainThread.strs[20];
                        saj1[1] = Integer.toString(4);
                        hi1.a(saj1);
                        super.I.a(i1);
                    } else {
                        e(123);
                    }
                    super.mainThread.recordManager.savePrefs();
                    return;

                case 45:
                    super.I.b(0);
                    super.I.b(40);
                    super.I.a(61, true);
                    if ((i1 = super.mainThread.recordManager.z.indexOf('@')) != -1) {
                        super.I.b[43].a(0, super.mainThread.recordManager.z.substring(0, i1), 64);
                        super.I.b[43].a(1, super.mainThread.recordManager.z.substring(i1 + 1, super.mainThread.recordManager.z.length()), 64);
                        super.I.b[43].a(2, super.mainThread.recordManager.x, 16);
                        return;
                    }
                    break;

                case 46:
                    if (v == -3) {
                        super.mainThread.recordManager.persona = (new String(super.I.a.B[0])).trim();
                        A = "persona:" + super.mainThread.recordManager.persona + ";";
                    } else if (v == -4) {
                        super.mainThread.recordManager.phoneNumber = (new String(super.I.a.B[0])).trim();
                        A = "PhoneNumber:" + super.mainThread.recordManager.phoneNumber + ";";
                    } else {
                        super.mainThread.recordManager.persona = (new String(super.I.a.B[0])).trim();
                        A = "persona:" + super.mainThread.recordManager.persona + ";";
                        super.mainThread.recordManager.phoneNumber = (new String(super.I.a.B[1])).trim();
                        A += "PhoneNumber:" + super.mainThread.recordManager.phoneNumber + ";";
                    }
                    if ((v == -3 || v == -5) && super.mainThread.recordManager.persona.length() < 5) {
                        cls_h hj1 = new cls_h(super.mainThread, (short) 19, (short) 41, (short) 6, (short) 4, 2);
                        String as2[];
                        (as2 = new String[2])[0] = super.mainThread.strs[19];
                        as2[1] = Integer.toString(5);
                        hj1.a(as2);
                        super.I.a(hj1);
                        return;
                    }
                    if ((v == -4 || v == -5) && super.mainThread.recordManager.phoneNumber.length() <= 0) {
                        cls_h hj1 = new cls_h(super.mainThread, (short) 290, (short) 85, (short) 6, (short) 4, 2);
                        super.I.a(hj1);
                        return;
                    } else {
                        e(129);
                        return;
                    }

                case 42:
                    super.mainThread.recordManager.y = (new String(super.I.a.B[0])).trim();
                    if (!j()) {
                        cls_h hj1 = new cls_h(super.mainThread, (short) 31, (short) 35, (short) 6, (short) 4, 2);
                        super.I.a(hj1);
                        return;
                    } else {
                        e(130);
                        return;
                    }

                case 43:
                    super.mainThread.recordManager.z = (new String(super.I.a.B[0])).trim() + "@";
                    super.mainThread.recordManager.z += (new String(super.I.a.B[1])).trim();
                    super.mainThread.recordManager.persona = (new String(super.I.a.B[3])).trim();
                    super.mainThread.recordManager.x = (new String(super.I.a.B[2])).trim();
                    super.mainThread.recordManager.phoneNumber = (new String(super.I.a.B[4])).trim();
                    if (!k() || (new String(super.I.a.B[0])).trim().length() == 0 || (new String(super.I.a.B[1])).trim().length() == 0) {
                        cls_h hj1 = new cls_h(super.mainThread, (short) 33, (short) 42, (short) 6, (short) 4, 2);
                        super.I.a(hj1);
                    } else if (super.mainThread.recordManager.persona.length() < 5) {
                        cls_h hj1 = new cls_h(super.mainThread, (short) 19, (short) 41, (short) 6, (short) 4, 2);
                        String as3[];
                        (as3 = new String[2])[0] = super.mainThread.strs[19];
                        as3[1] = Integer.toString(5);
                        hj1.a(as3);
                        super.I.a(hj1);
                    } else if (super.mainThread.recordManager.x.length() < 4) {
                        cls_h hj1 = new cls_h(super.mainThread, (short) 20, (short) 41, (short) 6, (short) 4, 2);
                        String as4[];
                        (as4 = new String[2])[0] = super.mainThread.strs[20];
                        as4[1] = Integer.toString(4);
                        hj1.a(as4);
                        super.I.a(hj1);
                    } else if (super.mainThread.recordManager.phoneNumber.length() <= 0) {
                        cls_h hj1 = new cls_h(super.mainThread, (short) 290, (short) 85, (short) 6, (short) 4, 2);
                        super.I.a(hj1);
                    } else {
                        e(124);
                    }
                    super.mainThread.recordManager.savePrefs();
                    return;

                case 51:
                    A = (new String(super.I.a.B[0])).trim();
                    if (A.length() >= 5) {
                        ao = null;
                        e(109);
                        return;
                    } else {
                        cls_h hj1 = new cls_h(super.mainThread, (short) 19, (short) 41, (short) 6, (short) 4, 2);
                        String as5[];
                        (as5 = new String[2])[0] = super.mainThread.strs[19];
                        as5[1] = Integer.toString(5);
                        hj1.a(as5);
                        super.I.a(hj1);
                        return;
                    }

                case 47:
                    A = (new String(super.I.a.B[0])).trim();
                    if (A.length() > 0) {
                        e(119);
                        return;
                    }
                    break;

                case 54:
                    if (super.I.a.c == 20) {
                        A = super.I.a.w[super.I.a.e];
                        ao = null;
                        e(109);
                        return;
                    } else {
                        super.I.a(55);
                        return;
                    }

                case 58: // ':'
                    e(121);
                    return;

                case 53:
                    e(120);
                    return;

                case 56:
                    super.I.b(0);
                    super.I.a(39);
                    return;

                case 38: // '&'
                    j1 = super.I.a.i * 7 + super.I.a.e;
                    super.I.a(37);
                    if (Integer.parseInt(G[11][j1]) == 1)
                        super.I.a.fld_q_short = 5;
                    else
                        super.I.a.fld_q_short = 6;
                    super.al = Integer.parseInt(d[0][super.mainThread.ao]);
                    int k1 = Integer.parseInt(G[5][j1]);
                    String s2 = super.al != k1 ? G[0][j1] : d[2][super.mainThread.ao];
                    si1 = G[1][j1].trim();
                    String s1 = G[10][j1].trim();
                    s1 = cls_b.b(s1);
                    s1 = cls_b.a(s1);
                    int k3 = 2;
                    if (s1.length() > 0)
                        k3++;
                    if (si1.length() > 0)
                        k3++;
                    String as6[] = new String[k3];
                    int l3 = 0;
                    if (s1.length() > 0) {
                        l3++;
                        as6[0] = new String(s1);
                    }
                    if (si1.length() > 0)
                        as6[l3++] = si1;
                    as6[l3++] = G[0][j1];
                    as6[l3] = s2;
                    super.I.b[37].a(as6);
                    if (s1.length() > 0)
                        super.I.b[37].v[0] = (short) (si1.length() <= 0 ? 70 : 71);
                    else
                        super.I.b[37].v[0] = (short) (si1.length() <= 0 ? 73 : 72);
                    super.I.b[37].a(super.mainThread.a(G[2][j1]));
                    return;

                case 37: // '%'
                    j1 = super.I.b[38].i * 7 + super.I.b[38].e;
                    if (Integer.parseInt(G[11][j1]) == 1) {
                        l = d[4][super.mainThread.ao];
                        o = d[0][super.mainThread.ao];
                        p = Integer.toString(super.I.b[38].y[super.I.b[38].e]);
                        q = G[9][j1];
                        n = G[0][j1];
                        m = G[2][j1];
                        super.I.a(57);
                    }
                    return;

                case 62: // '>'
                    super.I.b(27);
                    return;

                case 57:
                    super.I.a(33);
                    return;

                case 59: // ';'
                    super.I.a(60);
                    q();
                    return;

                case 60: // '<'
                    A = "";
                    for (j1 = 0; j1 < super.I.a.B.length; j1++)
                        A += (new String(super.I.a.B[j1])).trim() + " ";

                    A = A.trim();
                    if (A.length() > 0) {
                        e(115);
                        return;
                    }
                    break;

                case 48:
                    super.I.e();
                    super.I.e();
                    return;

                case 33: // '!'
                    super.J.d();
                    super.mainThread.fld_m_Vector.removeAllElements();
                    super.mainThread.cn = null;
                    super.mainThread.i();
                    super.mainThread.T = 3 * super.I.a.e + super.mainThread.j(3);
                    if (super.mainThread.T / 3 == 2)
                        super.mainThread.T = 6;
                    if (super.mainThread.aW && !ap) {
                        s = o;
                        r = p;
                        e(113);
                    }
                    m();
                    return;

                case 8:
                    if (super.I.a.c == 11 || super.I.a.c == 3)
                        super.mainThread.ao = (super.I.a.i + super.I.a.j) * 7 + super.I.a.e;
                    else
                        super.mainThread.ao = super.I.a.i * 7 + super.I.a.e;
                    if (super.mainThread.aW) {
                        if (super.I.a.c == 11) {
                            super.I.b[29].v[0] = 87;
                            super.I.b[29].c = 11;
                            super.I.a(29);
                            return;
                        }
                        if (super.I.a.c == 5) {
                            l = d[4][super.mainThread.ao];
                            o = d[0][super.mainThread.ao];
                            super.I.a(33);
                            return;
                        }
                        if (super.I.a.c == 4) {
                            l = d[4][super.mainThread.ao];
                            o = d[0][super.mainThread.ao];
                            e(108);
                            return;
                        } else {
                            super.I.b[36].c = 23;
                            super.I.a(36);
                            super.I.b[36].a(super.mainThread.a(d[4][super.mainThread.ao]));
                            return;
                        }
                    }
                    if (Integer.parseInt(d[1][super.mainThread.ao]) == 0) {
                        super.I.a(36);
                        super.I.b[36].a(super.mainThread.a(d[4][super.mainThread.ao]));
                        return;
                    } else {
                        super.I.a(66);
                        super.I.b[66].a(super.mainThread.a(d[4][super.mainThread.ao]));
                        return;
                    }

                case 28:
                    if (super.mainThread.aW) {
                        l();
                        return;
                    }
                    break;

                case 68:
                    super.I.e();
                    super.I.e();
                    super.I.e();
                    return;

                case 70:
                    if ((sj1 = (new String(super.I.b[70].B[0])).trim()).length() == 10) {
                        super.mainThread.recordManager.H = sj1;
                        o();
                        b(super.mainThread.recordManager.H);
                        super.I.b[72].a(c(super.mainThread.recordManager.H));
                        super.I.a(72);
                        super.mainThread.recordManager.savePrefs();
                    } else {
                        cls_h h1 = new cls_h(super.mainThread, (short) 99, (short) 287, (short) 6, (short) 4, 2);
                        super.mainThread.y.a(h1);
                        return;
                    }
                    break;

                case 71: // 'G'
                {
                    sj1 = d[4][super.mainThread.ao];
                    for (int l1 = 0; l1 < 6; l1++) {
                        super.I.b[34].B[l1] = new char[10];
                        for (int i3 = 0; i3 < 10; i3++)
                            super.I.b[34].B[l1][i3] = sj1.charAt(l1 * 10 + i3);

                    }

                    super.I.b[34].a(super.mainThread.strs[97] + (new Character('|')).toString() + c(sj1));
                    super.I.b[34].c = 1;
                    super.I.a(34);
                }
                return;

                case 74:
                    super.I.b[34].c = 2;
                    super.I.a(34);
                    return;

                case 72:
                    super.I.e();
                    super.I.e();
                    if (super.I.b[70].c == 31) {
                        sj1 = d[4][super.mainThread.ao];
                        for (int i2 = 0; i2 < 6; i2++) {
                            super.I.b[34].B[i2] = new char[10];
                            for (int j3 = 0; j3 < 10; j3++)
                                super.I.b[34].B[i2][j3] = sj1.charAt(i2 * 10 + j3);

                        }

                        super.I.b[34].a(super.mainThread.strs[97] + new Character('|') + c(sj1));
                        super.I.b[34].c = 1;
                        super.I.a(34);
                        return;
                    }
                    break;

                case 27:
                    super.mainThread.i(77);
                    super.mainThread.N = 7;
                    super.mainThread.a();
                    if (super.mainThread.aW && !ap) {
                        s = o;
                        r = p;
                        e(113);
                    }
                    super.mainThread.l(2);
                    super.mainThread.a();
                    super.mainThread.b();
                    return;

                case 34:
                    if (!super.mainThread.aW && super.I.a.c == 2) {
                        sj1 = "";
                        for (int j2 = 0; j2 < 6; j2++)
                            sj1 = sj1 + new String(super.I.a.B[j2]);

                        cls_d d1 = new cls_d(super.mainThread, 36, 0, 0);
                        if (super.mainThread.a(d1, sj1)) {
                            if (!super.mainThread.co.contains(sj1)) {
                                super.mainThread.co.addElement(sj1);
                                super.mainThread.cp.addElement(new Integer(36));
                                n();
                                super.mainThread.recordManager.g();
                                super.I.a(68);
                                super.mainThread.g();
                            } else {
                                super.I.a(69);
                            }
                        } else {
                            cls_h h2 = new cls_h(super.mainThread, (short) 290, (short) 11, (short) 6, (short) 4, 2);
                            super.I.a(h2);
                            return;
                        }
                    }
                    break;

                case 65: // 'A'
                    super.I.a(39);
                    return;

                case 64:
                    A = "1";
                    e(128);
                    return;

                case 9:
                case 10:
                case 11: // '\013'
                case 12: // '\f'
                case 13:
                case 14: // '\016'
                case 15:
                case 16:
                case 17: // '\021'
                case 18: // '\022'
                case 19: // '\023'
                case 20: // '\024'
                case 21: // '\025'
                case 22: // '\026'
                case 23: // '\027'
                case 24: // '\030'
                case 25: // '\031'
                case 26: // '\032'
                case 36: // '$'
                case 39: // '\''
                case 40: // '('
                case 49:
                case 50:
                case 52:
                case 55:
                case 61:
                case 66:
                case 67:
                case 69:
                case 73:
                default:
                    super.b(i1, j1);
                    return;
            }
        } else if ((i1 & 0x40000) != 0 || (i1 & 0x40) != 0) {
            if (super.mainThread.aU) {
                y = null;
                p();
                return;
            }
            switch (j1) {
                case 27:
                    l = null;
                    m = null;
                    super.mainThread.fld_m_Vector.removeAllElements();
                    super.mainThread.k();
                    if (super.mainThread.aW) {
                        if (ap) {
                            super.I.b(0);
                            super.I.a(40);
                            super.I.a(49);
                            return;
                        }
                        i1 = 0;
                        if (c != null) {
                            j1 = 0;
                            do {
                                if (j1 >= c[0].length)
                                    break;
                                if (q.equals(c[0][j1])) {
                                    i1 = 1;
                                    break;
                                }
                                j1++;
                            } while (true);
                        }
                        if (i1 != 0) {
                            super.I.b(0);
                            super.I.a(39);
                        } else {
                            super.I.b[53].a(n);
                            super.I.a(53);
                            return;
                        }
                    } else {
                        super.I.b(0);
                        super.I.a(67);
                        return;
                    }
                    break;

                case 39: // '\''
                case 40: // '('
                case 67:
                    super.mainThread.k(4);
                    return;

                case 53:
                    super.I.b(0);
                    super.I.a(39);
                    return;

                case 59: // ';'
                    super.I.a(27);
                    return;

                case 69:
                    super.I.e();
                    super.I.e();
                    return;

                case 64:
                    A = "0";
                    e(128);
                    return;

                case 65: // 'A'
                    super.mainThread.R = 4;
                    super.I.c();
                    super.I.b(0);
                    return;

                case 48:
                case 68:
                    return;

                case 30: // '\036'
                    if ((i1 & 0x40) != 0) {
                        super.I.b(0);
                        if (super.mainThread.aW) {
                            super.I.a(39);
                            if (d != null) {
                                a(8, d);
                                super.I.a(8);
                                return;
                            }
                        } else {
                            super.I.a(67);
                            if (super.I.b[29].c == 9) {
                                if (d[0].length > 1) {
                                    a(8, d);
                                    super.I.a(8);
                                    return;
                                }
                            } else if (ao[0].length > 1) {
                                a(31, ao);
                                super.I.a(31);
                                return;
                            }
                        }
                    }
                    break;

                case 41: // ')'
                    if (super.mainThread.y.a.h == 0 && !super.mainThread.recordManager.K) {
                        super.mainThread.recordManager.H = "";
                        super.mainThread.recordManager.persona = "";
                        super.mainThread.recordManager.z = "";
                        super.mainThread.recordManager.phoneNumber = "";
                        super.mainThread.recordManager.x = "";
                    }
                    super.b(i1, j1);
                    return;

                case 28:
                case 29:
                case 31:
                case 32:
                case 33: // '!'
                case 34:
                case 35:
                case 36: // '$'
                case 37: // '%'
                case 38: // '&'
                case 42:
                case 43:
                case 44:
                case 45:
                case 46:
                case 47:
                case 49:
                case 50:
                case 51:
                case 52:
                case 54:
                case 55:
                case 56:
                case 57:
                case 58: // ':'
                case 60: // '<'
                case 61:
                case 62: // '>'
                case 63: // '?'
                case 66:
                default:
                    if (!super.mainThread.aU)
                        super.b(i1, j1);
                    q();
                    return;
            }
        } else {
            super.b(i1, j1);
            q();
        }
    }

    final void b_(int i1) {
        super.b_(i1);
        if (i1 == 7 && super.mainThread.B) {
            if (a.F > 0 && a.F > fld_b_d.F) {
                if (fld_b_d.F < 0)
                    fld_b_d.F = 0;
                i1 = ((a.F - fld_b_d.F) * 100) / a.G;
                byte byte0 = 58;
                super.mainThread.cn = a;
                fld_b_d.N = false;
                fld_b_d.R = 0L;
                fld_b_d.f(fld_b_d.F << 1);
                if (i1 >= 95)
                    byte0 = 53;
                else if (i1 >= 75)
                    byte0 = 54;
                else if (i1 >= 50)
                    byte0 = 55;
                else if (i1 >= 35)
                    byte0 = 56;
                else if (i1 >= 15)
                    byte0 = 57;
                super.mainThread.cB = MainThread.a(super.mainThread.strs[byte0], n.toUpperCase());
                r = o;
                s = p;
                if (super.mainThread.aW && (!ap || super.mainThread.J))
                    e(114);
                return;
            }
            if (fld_b_d.F > 0 && fld_b_d.F > a.F) {
                if (a.F < 0)
                    a.F = 0;
                i1 = ((fld_b_d.F - a.F) * 100) / fld_b_d.G;
                byte byte1 = 64;
                super.mainThread.cn = fld_b_d;
                a.N = false;
                a.R = 0L;
                a.f(a.F << 1);
                if (i1 >= 95)
                    byte1 = 59;
                else if (i1 >= 75)
                    byte1 = 60;
                else if (i1 >= 50)
                    byte1 = 61;
                else if (i1 >= 35)
                    byte1 = 62;
                else if (i1 >= 15)
                    byte1 = 63;
                super.mainThread.cB = MainThread.a(super.mainThread.strs[byte1], n.toUpperCase());
                r = p;
                s = o;
                if (super.mainThread.aW && (!ap || super.mainThread.J))
                    e(114);
                return;
            }
            a.N = false;
            a.a();
            a.R = 0L;
            a.f(a.F << 1);
            fld_b_d.N = false;
            fld_b_d.a();
            fld_b_d.R = 0L;
            fld_b_d.f(fld_b_d.F << 1);
            super.mainThread.cB = super.mainThread.strs[30];
            super.mainThread.recordManager.A = "";
            r = "-1";
            s = "-1";
        }
    }

    final void a() {
        super.mainThread.i();
        super.mainThread.a();
        a = null;
        fld_b_d = null;
        h = null;
        i = null;
        a = a(l, 36);
        fld_b_d = a(m, 37);
        a.o = new cls_aa(0, 0);
        fld_b_d.o = new cls_aa(super.mainThread.cz >> 1, 0);
        super.mainThread.a();
        j = null;
        super.mainThread.cn = a;
//        byte byte0;
        super.mainThread.ci.a = super.mainThread.cn.o.a - ((88) << 8);
        super.mainThread.ci.b = super.mainThread.cn.o.b - ((104) << 8);
        for (int i1 = 0; i1 < 38; i1++) {
            int j1 = fld_g_int_A2[i1][super.mainThread.U];
            for (int k1 = 0; k1 < j1; k1++) {
                cls_d d1 = new cls_d(super.mainThread, i1, super.mainThread.j(super.mainThread.cz), super.mainThread.j(super.mainThread.cy));
                (d1).l = d1.fld_m_int = super.mainThread.j(256);
                d1.d = d1.e;
                super.mainThread.fld_m_Vector.addElement(d1);
                super.mainThread.a(d1);
                if (d1.v) {
                    int l1 = MainThread.a(super.mainThread.ck.o, d1.o);
                    d1.o.a += (super.mainThread.cz >> 1) * MainThread.g(l1);
                    d1.o.b += (super.mainThread.cy >> 1) * MainThread.f(l1);
                    if ((d1.H & 0x40) != 0) {
                        for (int i2 = 0; i2 < d1.q.length; i2++) {
                            d1.q[i2].a = d1.o.a;
                            d1.q[i2].b = d1.o.b;
                        }

                    }
                }
                if ((k1 & 1) == 0)
                    super.mainThread.a();
            }

        }

        a.c = fld_b_d;
        fld_b_d.c = a;
        h = new cls_d(super.mainThread, 36, 0, 15);
        h.b(a);
        h.fld_m_int = 0;
        super.mainThread.a();
        i = new cls_d(super.mainThread, 37, 176, 15);
        i.b(fld_b_d);
        i.fld_m_int = 128;
        super.mainThread.a();
        h.c = i;
        i.c = h;
        super.mainThread.a();
        super.mainThread.A = false;
    }

    final void a(int i1, int j1) {
        if ((i1 & 0x1020) != 0) {
            j = null;
            k = ++k % 2;
            super.mainThread.cn = (cls_d) super.mainThread.fld_m_Vector.elementAt(k);
            return;
        }
        if ((j1 & 0x202) != 0 || (j1 & 0x808) != 0 || (j1 & 0x8004) != 0 || (j1 & 0x2010) != 0) {
            if (j == null) {
                j = new cls_d(super.mainThread, 50, ( super.mainThread.cn.o.a) >> 8, (super.mainThread.cn.o.b) >> 8);
                super.mainThread.cn = j;
            }
            j.fld_m_int = super.mainThread.m(j.fld_m_int);
            j.o.a = j.o.a + ((MainThread.g(j.fld_m_int)) * (j.e) >> 8);
            j.o.b = j.o.b + ((MainThread.f(j.fld_m_int)) * (j.e) >> 8);
        }
    }

    private void i() {
        super.I.b[63] = new cls_h(super.mainThread, (short) 33, (short) 114, (short) 3, (short) 4, 2);
        super.I.b[28] = new cls_h(super.mainThread, (short) 86, (short) 13, (short) 3, (short) 4, 2);
        super.I.b[29] = new cls_h(super.mainThread, (short) 86, (short) 87, (short) 3, (short) 2, 2);
        super.mainThread.a();
        super.I.b[30] = new cls_h(super.mainThread, (short) 86, (short) 88, (short) 3, (short) 6, 2);
        super.I.b[31] = new cls_h(super.mainThread, (short) 29, (short) 3, (short) 4, 8);
        super.I.b[31].c = 6;
        super.I.b[27] = new cls_h(super.mainThread, (short) 3, (short) 27, (short) 3, (short) 2, 2);
        super.I.b[33] = new cls_h(super.mainThread, (short) 8, (short) 3, (short) 4, 1);
        super.mainThread.a();
        super.I.b[33].A = new short[6][];
        for (int i1 = 0; i1 < 6; i1++)
            super.I.b[33].A[i1] = (new short[]{
                    (short) (i1 + 57), 1
            });

        super.I.b[34] = new cls_h(super.mainThread, (short) 0, (short) 3, (short) 4, 6);
        super.I.b[34].A = new short[2][];
        super.I.b[34].A[0] = (new short[]{
                64, 1
        });
        super.I.b[34].A[1] = (new short[]{
                65, 1
        });
        super.mainThread.a();
        if (super.mainThread.aW) {
            super.I.b[35] = new cls_h(super.mainThread, (short) 67, (short) 68, (short) 3, (short) 4, 3);
            super.I.b[36] = new cls_h(super.mainThread, (short) 5, new short[]{
                    45, 67, 51, 9, 86
            }, (short) 3, (short) 4, 0);
            super.I.b[40] = new cls_h(super.mainThread, (short) 3, new short[]{
                    107, 108, 17
            }, (short) 3, (short) 4, 0);
            super.mainThread.a();
            super.I.b[41] = new cls_h(super.mainThread, (short) 107, new short[]{
                    33, -1, -1, 20, 0, 115
            }, (short) 3, (short) 4, 9);
            super.I.b[41].c = 16;
            super.I.b[41].d = 5;
            super.I.b[41].z[5] = (new short[]{
                    2, 1
            });
            super.I.b[41].y[5] = super.mainThread.recordManager.K ? 1 : 0;
            super.I.b[44] = new cls_h(super.mainThread, (short) 290, new short[]{
                    20, 0, 116
            }, (short) 3, (short) 4, 9);
            super.I.b[44].c = 18;
            super.I.b[44].a((short) 109);
            super.I.b[44].z[2] = new short[0];
            super.mainThread.a();
            super.I.b[45] = new cls_h(super.mainThread, (short) 290, (short) 110, (short) 3, (short) 4, 2);
            super.I.b[43] = new cls_h(super.mainThread, (short) 18, new short[]{
                    33, -1, -1, 20, 0, 19, 0, 258, 0, 115
            }, (short) 3, (short) 4, 9);
            super.I.b[43].c = 17;
            super.I.b[43].d = 9;
            super.I.b[43].z[9] = (new short[]{
                    2, 1
            });
            super.I.b[43].y[9] = super.mainThread.recordManager.K ? 1 : 0;
            super.mainThread.a();
            super.I.b[42] = new cls_h(super.mainThread, (short) 31, new short[]{
                    31, 0, 32
            }, (short) 3, (short) 4, 9);
            super.I.b[49] = new cls_h(super.mainThread, (short) 3, new short[]{
                    22
            }, (short) 3, (short) 4, 0);
            super.I.b[37] = new cls_h(super.mainThread, (short) 67, (short) 72, (short) 5, (short) 4, 3);
            super.I.b[61] = new cls_h(super.mainThread, (short) 91, new short[]{
                    105, 106
            }, (short) 3, (short) 2, 0);
            super.I.b[61].a((short) 92);
            super.mainThread.a();
            super.I.b[62] = new cls_h(super.mainThread, (short) 78, (short) 80, (short) 3, (short) 6, 2);
            super.I.b[32] = new cls_h(super.mainThread, (short) 49, (short) 3, (short) 4, 8);
            super.I.b[32].c = 7;
            super.I.b[38] = new cls_h(super.mainThread, (short) 45, (short) 3, (short) 4, 8);
            super.I.b[38].c = 8;
            super.I.b[39] = new cls_h(super.mainThread, (short) 3, new short[]{
                    22, 40, 5, 49, 23, 28
            }, (short) 3, (short) 4, 0);
            super.mainThread.a();
            super.I.b[47] = new cls_h(super.mainThread, (short) 51, new short[]{
                    51, 0
            }, (short) 3, (short) 4, 9);
            super.I.b[47].c = 14;
            super.I.b[48] = new cls_h(super.mainThread, (short) 34, (short) 52, (short) 3, (short) 6, 2);
            super.I.b[57] = new cls_h(super.mainThread, (short) 3, (short) 27, (short) 3, (short) 2, 2);
            super.I.b[50] = new cls_h(super.mainThread, (short) 24, new short[]{
                    23, 25, 19, 26, 21
            }, (short) 3, (short) 4, 0);
            super.mainThread.a();
            super.I.b[51] = new cls_h(super.mainThread, (short) 19, new short[]{
                    19, 0
            }, (short) 3, (short) 4, 9);
            super.I.b[51].c = 13;
            super.I.b[52] = new cls_h(super.mainThread, (short) 156, new short[]{
                    126, 127, 128, 129
            }, (short) 3, (short) 4, 0);
            super.I.b[53] = new cls_h(super.mainThread, (short) 23, (short) 38, (short) 3, (short) 2, 2);
            super.I.b[56] = new cls_h(super.mainThread, (short) 34, (short) 44, (short) 3, (short) 6, 2);
            super.mainThread.a();
            super.I.b[54] = new cls_h(super.mainThread, (short) 23, (short) 3, (short) 4, 0);
            super.I.b[55] = new cls_h(super.mainThread, (short) 23, new short[]{
                    84, 74
            }, (short) 3, (short) 4, 0);
            super.I.b[58] = new cls_h(super.mainThread, (short) 23, (short) 75, (short) 3, (short) 2, 2);
            super.I.b[59] = new cls_h(super.mainThread, (short) 78, (short) 79, (short) 3, (short) 2, 2);
            super.mainThread.a();
            super.I.b[60] = new cls_h(super.mainThread, (short) 78, new short[]{
                    78, 0, 0, 0, 0
            }, (short) 6, (short) 4, 9);
            super.I.b[60].c = 15;
            super.I.b[65] = new cls_h(super.mainThread, (short) 34, (short) 112, (short) 3, (short) 4, 2);
            super.I.b[65].a(super.mainThread.websiteURL);
            super.I.b[64] = new cls_h(super.mainThread, (short) 34, (short) 113, (short) 3, (short) 2, 2);
            return;
        } else {
            super.I.b[36] = new cls_h(super.mainThread, (short) 5, new short[]{
                    40, 93, 86
            }, (short) 3, (short) 4, 0);
            super.mainThread.a();
            super.I.b[66] = new cls_h(super.mainThread, (short) 5, new short[]{
                    40, 86
            }, (short) 3, (short) 4, 0);
            super.mainThread.a();
            super.I.b[67] = new cls_h(super.mainThread, (short) 3, new short[]{
                    22, 5, 6
            }, (short) 3, (short) 4, 0);
            super.mainThread.a();
            super.I.b[68] = new cls_h(super.mainThread, (short) 34, (short) 12, (short) 3, (short) 6, 2);
            super.mainThread.a();
            super.I.b[69] = new cls_h(super.mainThread, (short) 290, (short) 43, (short) 6, (short) 4, 2);
            super.mainThread.a();
            super.I.b[70] = new cls_h(super.mainThread, (short) 99, new short[]{
                    97, 0
            }, (short) 3, (short) 4, 9);
            super.I.b[70].a(super.mainThread.websiteURL);
            super.I.b[70].a((short) 94);
            super.mainThread.a();
            super.I.b[71] = new cls_h(super.mainThread, (short) 93, (short) 98, (short) 3, (short) 4, 2);
            super.I.b[71].p = true;
            super.I.b[71].a(super.mainThread.websiteURL);
            super.mainThread.a();
            super.I.b[72] = new cls_h(super.mainThread, (short) 95, (short) 96, (short) 3, (short) 4, 2);
            super.mainThread.a();
            super.I.b[74] = new cls_h(super.mainThread, (short) 6, (short) 100, (short) 3, (short) 4, 2);
            super.I.b[74].p = true;
            super.I.b[74].a(super.mainThread.websiteURL);
            return;
        }
    }

    final void a(int ai[]) {
        aq = MainThread.a(3, ai);
    }

    final void b() {
        if (0x1d4c0L - super.mainThread.bR <= 0L) {
            super.mainThread.B = true;
            super.mainThread.gameState = 12;
        }
    }

    final void d() {
        if (super.mainThread.ca > 0L && super.mainThread.ca < MainThread.bP) {
            super.mainThread.ca = 0L;
            super.mainThread.cj.b(352, 104, 6);
            return;
        }
//        char c1;
        if (super.mainThread.cj.a >= ('\260') << 8) {
            if (super.mainThread.aW) {
                if (!super.mainThread.aU) {
                    if (super.mainThread.J) {
                        e(118);
                        return;
                    }
                    if (!ap && r.equals(o)) {
                        super.I.b[59].a(n);
                        super.I.b(59);
//                        return;
                    } else {
                        super.I.b(27);
//                        return;
                    }
                } else {
                    super.mainThread.d();
                    super.mainThread.a(super.mainThread.bufferGraphics, 0x80016);
//                    return;
                }
            } else {
                super.I.b(27);
//                return;
            }
        } else {
            super.mainThread.d();
            super.mainThread.cj.b();
            super.mainThread.a(super.mainThread.bufferGraphics, 534);
//            return;
        }
    }

    final void a(Graphics g1) {
        int l1 = (88 - aq.getWidth()) + 1;
        for (int i2 = 0; i2 < 2; i2++) {
            int i1;
            if (i2 == 0)
                i1 = 88 - (aq.getWidth() >> 1) - l1;
            else
                i1 = 88 + (aq.getWidth() >> 1);
            g1.setColor(0);
            g1.fillRect(i1, 7, l1, 10);
            g1.setColor(0x8d8d8d);
            g1.drawLine(i1, 8, i1 + l1, 8);
            g1.drawLine(i1, 15, i1 + l1, 15);
        }

        if (a.F > 0) {
            int j1 = (a.F * 100) / a.G;
            if ((j1 = (l1 * j1) / 100) <= 0)
                j1 = 1;
            if (a.F < a.G >> 2)
                g1.setColor(0xff0000);
            else if (a.F < a.G >> 1)
                g1.setColor(0xffa500);
            else
                g1.setColor(0xffff00);
            g1.fillRect(88 - (aq.getWidth() >> 1) - j1, 9, j1, 6);
        }
        if (fld_b_d.F > 0) {
            int k1 = (fld_b_d.F * 100) / fld_b_d.G;
            if ((k1 = (l1 * k1) / 100) <= 0)
                k1 = 1;
            if (fld_b_d.F < fld_b_d.G >> 2)
                g1.setColor(0xff0000);
            else if (fld_b_d.F < fld_b_d.G >> 1)
                g1.setColor(0xffa500);
            else
                g1.setColor(0xffff00);
            g1.fillRect(88 + (aq.getWidth() >> 1), 9, k1, 6);
        }
        g1.drawImage(aq, 88, 0, 17);
        g1.drawImage(aq, 0, 0, 17);
        g1.drawImage(aq, DeviceInfo.DEVICE_SCREEN_WIDTH, 0, 17);
        cls_aa aa1 = new cls_aa(0, 0);
        h.a(aa1);
        i.a(aa1);
        super.mainThread.u.a(g1, super.mainThread.a(0x1d4c0L - super.mainThread.bR), 98, 7 * (aq.getHeight() >> 1) >> 3, 3);
    }

    final void g() {
        super.I.b(0);
        if (super.mainThread.aW) {
            super.mainThread.R = 4;
            super.I.d();
            super.I.b(0);
            super.mainThread.R = 2;
            if (super.mainThread.recordManager.I && super.mainThread.recordManager.J) {
                if (!super.mainThread.co.isEmpty()) {
                    a(!super.mainThread.recordManager.K);
                    byte byte0 = 40;
//                    cls_ae ae1 = super.I;
                    super.I.a(byte0, false);
                    return;
                } else {
                    super.I.d();
                    byte byte1 = 39;
//                    cls_ae ae2 = super.I;
                    super.I.a(byte1, false);
                    return;
                }
            } else {
                byte byte2 = 40;
//                cls_ae ae3 = super.I;
                super.I.a(byte2, false);
                super.mainThread.R = 4;
                return;
            }
        }
        if (super.mainThread.recordManager.H.length() > 0)
            b(super.mainThread.recordManager.H);
        byte byte3 = 67;
//        cls_ae ae4 = super.I;
        super.I.a(byte3, false);
    }

    final void a(int i1) {
        img104 = null;
        img105 = null;
        if (c != null) {
            super.mainThread.aZ = new String[2][];
            a(c, super.mainThread.aZ);
        }
        if (d != null) {
            super.mainThread.ba = new String[9][];
            a(d, super.mainThread.ba);
        }
        super.mainThread.J = false;
    }

    private boolean j() {
        if (super.mainThread.recordManager.y.length() != 10)
            return false;
        int i1 = Integer.parseInt(super.mainThread.recordManager.y.substring(0, 4));
        int j1 = Integer.parseInt(super.mainThread.recordManager.y.substring(5, 7));
        int k1 = Integer.parseInt(super.mainThread.recordManager.y.substring(8, super.mainThread.recordManager.y.length()));
        if (j1 > 12 || j1 <= 0 || k1 > 31 || k1 <= 0)
            return false;
        i1 = j1 != 2 ? (j1 % 2 == 0 || j1 > 7) && (j1 % 2 != 0 || j1 <= 7) ? 30 : 31 : i1 % 4 == 0 ? i1 % 400 != 0 ? i1 % 100 != 0 ? 29 : 28 : 29 : 28;
        return k1 <= i1;
    }

    private boolean k() {
        char ac1[] = super.mainThread.recordManager.z.toCharArray();
        for (int i1 = 0; i1 < ac1.length; i1++) {
            char c1;
            if (((c1 = ac1[i1]) < 'A' || c1 > 'Z') && (c1 < 'a' || c1 > 'z') && (c1 < '0' || c1 > '9') && c1 != '@' && c1 != '.' && c1 != '_' && c1 != '-')
                return false;
        }

        return true;
    }

    private cls_d a(String s1, int i1) {
        cls_d di1 = new cls_d(super.mainThread, i1, 0, 0);
        super.mainThread.a(di1, s1);
        di1.B = 65;
        di1.F = di1.G = 100;
        di1.fld_m_int = super.mainThread.j(256);
        di1.a();
        super.mainThread.fld_m_Vector.addElement(di1);
        return di1;
    }

    private void a(int i1, String as[][]) {
        super.I.b[i1].x = new String[as.length][];
        if (super.I.b[i1].fld_b_int == 8) {
            int j1 = super.I.b[i1].x.length + 1;
            super.I.b[i1].u = new int[j1];
            super.I.b[i1].t = new byte[j1];
        }
        a(as, super.I.b[i1].x);
    }

    private void l() {
        super.I.b[8].c = 11;
        String as[][] = new String[9][];
        String s1 = d[2][0];
        int i1 = d[0].length + super.mainThread.co.size();
        for (int k1 = 0; k1 < 9; k1++) {
            as[k1] = new String[i1];
            System.arraycopy(d[k1], 0, as[k1], 0, d[k1].length);
        }

        for (int l1 = 0; l1 < super.mainThread.co.size(); l1++) {
            int j1 = l1 + d[0].length;
            as[0][j1] = "-1";
            as[4][j1] = (String) super.mainThread.co.elementAt(l1);
            as[2][j1] = s1;
            as[3][j1] = "";
        }

        a(8, as);
        byte byte0 = 8;
//        cls_ae ae1 = super.I;
        super.I.a(byte0, false);
    }

    public final void run() {
        HttpConnection httpconnection;
        InputStream inputstream;
        OutputStream outputstream;
        httpconnection = null;
        inputstream = null;
        outputstream = null;
        try {
            (httpconnection = (HttpConnection) Connector.open(z)).setRequestMethod("POST");
            httpconnection.setRequestProperty("Content-Type", "application/octet-stream");
            httpconnection.setRequestProperty("User-Agent", "Profile/MIDP-2.0 Configuration/CLDC-1.0");
            httpconnection.setRequestProperty("Content-Language", "en-US");
            outputstream = httpconnection.openOutputStream();
            w = httpconnection.getResponseCode();
            if (w != 200 && w != 100)
                throw new IOException("HTTP response code " + w);
            w = 200;
            inputstream = httpconnection.openInputStream();
//            boolean flag = false;
            int j1 = 0;
            byte abyte1[] = new byte[1024];
            do {
                if (j1 == abyte1.length) {
                    byte abyte0[] = new byte[abyte1.length + 1024];
                    System.arraycopy(abyte1, 0, abyte0, 0, abyte1.length);
                    abyte1 = abyte0;
                }
                int i1;
                if ((i1 = inputstream.read(abyte1, j1, 1)) == -1)
                    break;
                j1 += i1;
            } while (true);
            String s1;
            if ((j1 = (s1 = new String(abyte1, 0, j1)).indexOf("\r\n\r\n")) != -1)
                s1 = s1.substring(j1).trim();
            a(s1);
        } catch (IOException ioe) {
            F = "Connection Error";
            try {
                if (inputstream != null) {
                    inputstream.close();
                }
                if (outputstream != null) {
                    outputstream.close();
                }
                if (httpconnection != null) {
                    httpconnection.close();
                }
            }
            catch (Exception _ex) {
                return;
            }
        } finally {
            try {
                if (inputstream != null)
                    inputstream.close();
                if (outputstream != null)
                    outputstream.close();
                if (httpconnection != null)
                    httpconnection.close();
            }
            catch (Exception _ex) {
                return;
            }
        }
    }

    private void m() {
        super.mainThread.gameState = 7;
        super.mainThread.i(23);
        super.mainThread.c();
        super.mainThread.l(2);
        super.mainThread.b();
    }

    final void e(int i1) {
        t = i1;
        String si1 = "";
        z = "";
        if (super.mainThread.recordManager.E.length() == 0) {
            u = t;
            t = 127;
        }
        switch (t) {
            case 123:
                si1 = "|SPOREMGR|Login|" + super.mainThread.recordManager.G + "|" + super.mainThread.recordManager.z + "|" + super.mainThread.recordManager.x;
                break;

            case 124:
                String s1 = super.mainThread.recordManager.y.substring(5, 7) + super.mainThread.recordManager.y.substring(8, super.mainThread.recordManager.y.length()) + super.mainThread.recordManager.y.substring(0, 4);
                si1 = "|SPOREMGR|Register|" + super.mainThread.recordManager.G + "|" + super.mainThread.recordManager.z + "|" + super.mainThread.recordManager.x + "|" + super.mainThread.recordManager.persona + "|PhoneNumber:" + super.mainThread.recordManager.phoneNumber + ";EmailAddress:" + super.mainThread.recordManager.z + ";DateOfBirth:" + s1 + ";LangCode:" + super.mainThread.recordManager.language;
                break;

            case 125:
                si1 = "|JEUSERA|guestLogin|" + super.mainThread.recordManager.G + "|LangCode:" + super.mainThread.recordManager.language;
                break;

            case 126:
                si1 = "|JEUSERA|forgotPassword|" + super.mainThread.recordManager.z;
                break;

            case 127:
                si1 = "|HW|getHardwareIdByDeviceAndCarrier|" + super.mainThread.recordManager.carrierCountryID + "|" + super.mainThread.recordManager.deviceID;
                break;

            case 102:
                si1 = "|SPOREMGR|DeleteMySpore|" + super.mainThread.recordManager.H + "|" + d[0][super.mainThread.ao];
                break;

            case 103: // 'g'
            case 104:
                si1 = "|SPOREMGR|AddMySpores|" + super.mainThread.recordManager.H + "|STRING";
                int j1 = super.mainThread.co.size();
                for (int k1 = 0; k1 < j1; k1++)
                    si1 = si1 + ",+" + super.mainThread.co.elementAt(k1);

                break;

            case 105:
            case 106:
                si1 = "|SPOREMGR|GetUserSpores|" + super.mainThread.recordManager.H;
                break;

            case 107:
                si1 = "|SPOREMGR|GetSpore|" + d[0][super.mainThread.ao];
                break;

            case 109: // 'm'
                si1 = "|SPOREMGR|GetUserSporesByUsername|" + A;
                break;

            case 108: // 'l'
                si1 = "|SPOREMGR|GetRandomSpores|" + super.mainThread.recordManager.H + "|1";
                break;

            case 118:
                si1 = "|SPOREMGR|GetRandomSpores|-1|2";
                break;

            case 112: // 'p'
                si1 = "|SPOREMGR|GetRandomSpores|" + super.mainThread.recordManager.H + "|" + Integer.toString(28);
                break;

            case 110: // 'n'
                si1 = "|SPOREMGR|GetTopSpores|" + Integer.toString(super.mainThread.aV) + "|" + Integer.toString(28) + "|0|" + Integer.toString(0x7fffffff) + "|-1|" + super.mainThread.recordManager.H;
                break;

            case 117: // 'u'
                si1 = "|SPOREMGR|GetTopSpores|" + Integer.toString(super.mainThread.aV) + "|" + Integer.toString(28) + "|0|" + Integer.toString(0x7fffffff) + "|-1|-1";
                break;

            case 111: // 'o'
                si1 = "|SPOREMGR|GetTopSpores|" + Integer.toString(super.mainThread.aV) + "|" + Integer.toString(28) + "|0|" + Integer.toString(0x7fffffff) + "|" + Integer.toString(super.I.a.e) + "|" + super.mainThread.recordManager.H;
                break;

            case 114: // 'r'
                super.mainThread.recordManager.A = "";
                // fall through

            case 113: // 'q'
                si1 = "|SPOREMGR|GamePlayed|" + r + "|" + s + "|" + o;
                break;

            case 119:
                si1 = "|SPOREMGR|NameMySpore|" + d[0][super.mainThread.ao] + "|" + A;
                break;

            case 116: // 't'
                si1 = "|SPOREMGR|GetRecentGames|" + d[0][super.mainThread.ao] + "|" + Integer.toString(super.mainThread.aV) + "|" + Integer.toString(28);
                break;

            case 122: // 'z'
                si1 = "|JEBLB|getEntireBuddyListForApp|spore|" + super.mainThread.recordManager.H;
                break;

            case 120: // 'x'
                si1 = "|JEBLB|addBuddy|spore|" + super.mainThread.recordManager.H + "|" + q + "|" + n;
                break;

            case 121: // 'y'
                si1 = "|JEBLB|deleteBuddy|spore|" + super.mainThread.recordManager.H + "|" + c[0][super.I.b[54].e];
                break;

            case 115: // 's'
                si1 = "|SPOREMGR|SetSmackTalk|" + B + "|" + A;
                break;

            case 128:
                si1 = "|JEUSERA|updateNucleusAccount|" + super.mainThread.recordManager.H + "|OptIn:" + A;
                break;

            case 129:
                si1 = "|SPOREMGR|updateNucleusAccount|" + super.mainThread.recordManager.H + "|" + A;
                break;

            case 130:
                String s2 = super.mainThread.recordManager.y.substring(5, 7) + super.mainThread.recordManager.y.substring(8, super.mainThread.recordManager.y.length()) + super.mainThread.recordManager.y.substring(0, 4);
                si1 = "|JEUSERA|isMinAgeSpecial|" + s2;
                break;
        }
        if (super.mainThread.recordManager.A.length() > 0) {
            u = t;
            t = 114;
            z = super.mainThread.recordManager.A;
        } else {
            String s3 = super.mainThread.recordManager.E.length() <= 0 ? "1" : super.mainThread.recordManager.E;
            z = Integer.toString((int) MainThread.bP) + "|spore|" + s3 + si1;
            if (t == 113 || t == 114)
                super.mainThread.recordManager.A = z;
        }
        if (t == 113)
            return;
        byte abyte0[] = C.a(z);
        z = super.mainThread.recordManager.httpURL + cls_g.a(abyte0);
        super.mainThread.aU = true;
        x = MainThread.bP + 20000L;
        super.mainThread.m();
        try {
            y = new Thread(this);
            y.start();
            return;
        }
        catch (Exception _ex) {
            y = null;
        }
    }

    final void h() {
        if (!y.isAlive()) {
            super.mainThread.aU = false;
            y = null;
            if (w != 200) {
                p();
                cls_h h1 = new cls_h(super.mainThread, (short) 290, (short) 81, (short) 6, (short) 4, 2);
                super.I.a(h1);
            } else if (F != null) {
                int i1;
                try {
                    i1 = Integer.parseInt(F);
                }
                catch (Exception _ex) {
                    i1 = -1000;
                }
                switch (i1) {
                    case -10:
                        super.I.a(63);
                        break;

                    case -11:
                        cls_h h11 = new cls_h(super.mainThread, (short) 33, (short) 42, (short) 6, (short) 4, 2);
                        super.I.a(h11);
                        break;

                    case -31:
                    case -20:
                        cls_h h12;
                        (h12 = new cls_h(super.mainThread, (short) 290, (short) 82, (short) 6, (short) 4, 2)).a(super.mainThread.strs[i1 != -31 ? 20 : 19]);
                        super.I.a(h12);
                        break;

                    case -30:
                        cls_h h13 = new cls_h(super.mainThread, (short) 290, (short) 83, (short) 6, (short) 4, 2);
                        super.I.a(h13);
                        break;

                    default:
                        cls_h h14 = new cls_h(super.mainThread, (short) 290, (short) 81, (short) 6, (short) 4, 2);
                        super.I.a(h14);
                        break;
                }
            } else {
                label0:
                switch (t) {
                    case 113: // 'q'
                    case 126:
                    default:
                        break;

                    case 127:
                        e(u);
                        break;

                    case 114: // 'r'
                        super.mainThread.recordManager.A = "";
                        if (super.mainThread.gameState != 12) {
                            e(u);
                            break;
                        }
                        if (super.mainThread.aY)
                            e(122);
                        break;

                    case 123:
                        switch (v) {
                            case 0:
                                ap = false;
                                super.mainThread.recordManager.I = true;
                                super.mainThread.recordManager.savePrefs();
                                e(105);
                                break label0;

                            case -1:
                                super.I.a(45);
                                break label0;

                            case -2:
                                super.I.a(44);
                                break label0;

                            case -5:
                            case -4:
                            case -3:
                                short aword0[];
                                if (v == -3)
                                    aword0 = (new short[]{
                                            19, 0
                                    });
                                else if (v == -4)
                                    aword0 = (new short[]{
                                            258, 0
                                    });
                                else
                                    aword0 = (new short[]{
                                            19, 0, 258, 0
                                    });
                                super.I.b[46] = new cls_h(super.mainThread, (short) 107, aword0, (short) 3, (short) 4, 9);
                                super.I.b(0);
                                super.I.a(46);
                                super.I.a.c = v;
                                break;

                            default:
                                cls_h h2 = new cls_h(super.mainThread, (short) 290, (short) 81, (short) 6, (short) 4, 2);
                                super.I.a(h2);
                                break;
                        }
                        break;

                    case 124:
                        super.mainThread.recordManager.I = true;
                        super.mainThread.recordManager.savePrefs();
                        ap = false;
                        for (int j1 = 0; j1 < super.I.b[43].B.length; j1++)
                            super.I.b[43].B[j1] = new char[16];

                        if (!super.mainThread.co.isEmpty())
                            e(104);
                        else
                            super.I.a(64);
                        break;

                    case 125:
                        ap = true;
                        n = super.mainThread.strs[48];
                        super.I.a(49);
                        break;

                    case 107:
                        super.I.a(35, true);
                        super.I.b[35].c = 27;
                        super.I.b[35].fld_q_short = 6;
                        String s1 = d[3][super.mainThread.ao].trim();
                        int j2 = 4;
                        if (s1.length() > 0)
                            j2++;
                        String as3[] = new String[j2];
                        j2 = 0;
                        j2++;
                        as3[0] = d[8][super.mainThread.ao];
                        j2++;
                        as3[1] = d[6][super.mainThread.ao];
                        j2++;
                        as3[2] = d[7][super.mainThread.ao];
                        if (s1.length() > 0) {
                            j2++;
                            as3[3] = s1;
                        }
                        as3[j2] = d[2][super.mainThread.ao];
                        super.I.b[35].a(as3);
                        super.I.b[35].v[0] = (short) (s1.length() <= 0 ? 69 : 68);
                        super.I.b[35].a(super.mainThread.a(d[4][super.mainThread.ao]));
                        break;

                    case 103: // 'g'
                    case 104:
                        super.mainThread.co.removeAllElements();
                        super.mainThread.recordManager.g();
                        if (t == 104) {
                            super.I.a(64);
                        } else {
                            super.mainThread.recordManager.J = true;
                            super.I.b(0);
                            super.I.a(65, true);
                        }
                        break;

                    case 102:
                        super.I.b(30);
                        if (d[0].length > 1) {
                            String as[][] = new String[9][];
                            for (int k2 = 0; k2 < 9; k2++) {
                                as[k2] = new String[d[k2].length - 1];
                                System.arraycopy(d[k2], 0, as[k2], 0, super.mainThread.ao);
                                System.arraycopy(d[k2], super.mainThread.ao + 1, as[k2], super.mainThread.ao, d[k2].length - (super.mainThread.ao + 1));
                            }

                            a(as, d);
                        } else {
                            d = null;
                        }
                        break;

                    case 106:
                        super.mainThread.aX = false;
                        if (d == null) {
                            cls_h h3 = new cls_h(super.mainThread, (short) 5, (short) 7, (short) 6, (short) 4, 2);
                            super.I.a(h3);
                        } else {
                            a(8, d);
                            super.I.a(8);
                        }
                        break;

                    case 105:
                        int k1;
                        if (!super.mainThread.co.isEmpty()) {
                            if ((k1 = super.mainThread.co.size() + (d == null ? 0 : d[0].length)) > 15) {
                                int l2 = k1 - 15;
                                super.I.b[28].c = 11;
                                String as4[];
                                (as4 = new String[2])[0] = l2 <= 1 ? super.mainThread.strs[104] : Integer.toString(l2);
                                as4[1] = l2 <= 1 ? super.mainThread.strs[103] : super.mainThread.strs[102];
                                super.I.b[28].a(as4);
                                super.I.b(0);
                                super.I.a(28);
                            } else {
                                e(103);
                            }
                        } else {
                            super.mainThread.recordManager.J = true;
                            super.I.d();
                            super.I.b(0);
                            super.I.a(65, true);
                        }
                        break;

                    case 109: // 'm'
                        if (ao == null || ao.length == 0) {
                            cls_h h4 = new cls_h(super.mainThread, (short) 290, (short) 39, (short) 6, (short) 4, 2);
                            super.I.a(h4);
                            break;
                        }
                        if (super.I.a.a != 31) {
                            super.I.b[31].c = 6;
                            a(31, ao);
                            super.I.a(31);
                        } else {
                            a(31, ao);
                            super.I.b[31].c();
                        }
                        break;

                    case 108: // 'l'
                        p = ao[0][0];
                        q = ao[1][0];
                        n = ao[2][0];
                        m = ao[4][0];
                        s = o;
                        r = p;
                        e(113);
                        super.mainThread.T = super.mainThread.j(6) * 3;
                        m();
                        break;

                    case 118:
                        o = ao[0][0];
                        l = ao[4][0];
                        p = ao[0][1];
                        q = ao[1][1];
                        n = ao[2][1];
                        m = ao[4][1];
                        super.mainThread.T = super.mainThread.j(6) * 3;
                        m();
                        break;

                    case 117: // 'u'
                        if (ao == null || ao.length == 0) {
                            cls_h h5 = new cls_h(super.mainThread, (short) 290, (short) 39, (short) 6, (short) 4, 2);
                            super.I.a(h5);
                            break;
                        }
                        if (super.I.a.a != 32) {
                            a(32, ao);
                            super.I.a(32);
                            break;
                        }
                        if (ao != null && ao.length != 0) {
                            a(32, ao);
                            super.I.b[32].c();
                        }
                        break;

                    case 110: // 'n'
                    case 111: // 'o'
                    case 112: // 'p'
                        if (ao == null || ao.length == 0) {
                            cls_h h6 = new cls_h(super.mainThread, (short) 290, (short) 39, (short) 6, (short) 4, 2);
                            super.I.a(h6);
                            break;
                        }
                        if (super.I.a.a != 31) {
                            super.I.b[31].c = t != 110 ? 6 : 7;
                            a(31, ao);
                            super.I.a(31);
                        } else {
                            a(31, ao);
                            super.I.b[31].c();
                        }
                        break;

                    case 121: // 'y'
                        if (c[0].length - 1 > 0) {
                            String as1[][] = new String[2][];
                            for (int i3 = 0; i3 < 2; i3++) {
                                as1[i3] = new String[c[i3].length - 1];
                                System.arraycopy(c[i3], 0, as1[i3], 0, super.I.b[54].e);
                                System.arraycopy(c[i3], super.I.b[54].e + 1, as1[i3], super.I.b[54].e, c[i3].length - (super.I.b[54].e + 1));
                            }

                            a(as1, c);
                            a(54, c);
                            super.I.e();
                            super.I.e();
                        } else {
                            c = null;
                            super.I.b(0);
                            super.I.a(39);
                        }
                        break;

                    case 120: // 'x'
                        int l1 = c != null ? c[0].length : 0;
                        String as2[][] = new String[2][];
                        for (int j3 = 0; j3 < 2; j3++) {
                            as2[j3] = new String[l1 + 1];
                            if (l1 > 0)
                                System.arraycopy(c[j3], 0, as2[j3], 0, l1);
                        }

                        as2[0][l1] = q;
                        as2[1][l1] = n;
                        if (c == null)
                            c = new String[2][];
                        a(as2, c);
                        a(54, c);
                        super.I.b[56].a(n);
                        super.I.b(56);
                        break;

                    case 122: // 'z'
                        super.mainThread.aY = false;
                        if (c == null) {
                            cls_h h7 = new cls_h(super.mainThread, (short) 23, (short) 77, (short) 6, (short) 4, 2);
                            super.I.a(h7);
                            break;
                        }
                        try {
                            a(54, c);
                            super.I.a(54);
                            break;
                        }
                        catch (NullPointerException _ex) {
                            c = null;
                        }
                        cls_h h15 = new cls_h(super.mainThread, (short) 23, (short) 77, (short) 6, (short) 4, 2);
                        super.I.a(h15);
                        break;

                    case 116: // 't'
                        if (G == null) {
                            cls_h h8 = new cls_h(super.mainThread, (short) 45, (short) 76, (short) 6, (short) 4, 2);
                            super.I.a(h8);
                            break;
                        }
                        for (int i2 = 0; i2 < super.mainThread.cq.size(); i2++)
                            if (Integer.parseInt((String) super.mainThread.cq.elementAt(i2)) == Integer.parseInt(d[0][super.mainThread.ao]))
                                super.mainThread.cq.removeElementAt(i2);

                        super.al = Integer.parseInt(d[0][super.mainThread.ao]);
                        a(38, G);
                        if (super.I.a.a != 38)
                            super.I.a(38);
                        else
                            super.I.b[38].c();
                        break;

                    case 119:
                        super.I.b[48].a(A);
                        d[3][super.mainThread.ao] = A;
                        a(8, d);
                        super.I.a(48);
                        break;

                    case 115: // 's'
                        super.I.b(62);
                        break;

                    case 128:
                        super.mainThread.recordManager.J = true;
                        super.I.d();
                        super.I.b(0);
                        super.I.a(65, true);
                        break;

                    case 129:
                        super.mainThread.recordManager.I = true;
                        super.mainThread.recordManager.savePrefs();
                        e(105);
                        break;

                    case 130:
                        if (A.equals("1")) {
                            super.I.a(43);
                        } else {
                            cls_h h9;
                            (h9 = new cls_h(super.mainThread, (short) 31, (short) 17, (short) 3, (short) 4, 0)).a((short) 111);
                            super.I.a(h9);
                        }
                        break;
                }
            }
            if (!super.mainThread.aU)
                super.mainThread.n();
            super.I.a.n = t;
            return;
        }
        if (x < MainThread.bP) {
            y = null;
            p();
            cls_h h10 = new cls_h(super.mainThread, (short) 290, (short) 37, (short) 6, (short) 4, 2);
            super.I.a(h10);
        }
    }

    private void a(String s1) {
        F = null;
        byte byte0 = 0;
        int i1 = -1;
        int j1 = 1;
        int k1 = 0;
        byte byte1 = 0;
//        Object obj = null;
        int l2 = 0;
//        boolean flag = false;
        int j4 = Math.max(s1.lastIndexOf('|'), s1.lastIndexOf('~'));
        String as[][] = null;
        do {
            int j3;
            if (l2 >= j4) {
                j3 = s1.length();
            } else {
                int l1 = s1.indexOf('|', l2);
                j3 = s1.indexOf('~', l2);
                if (l1 > l2 && j3 > l2)
                    j3 = Math.min(l1, j3);
                else
                    j3 = Math.max(l1, j3);
            }
            String s2 = s1.substring(l2, j3);
            l2 = j3 + 1;
            if (byte0 == 1) {
                if (i1 == -1) {
                    if (as == null) {
                        if (s2.startsWith("GPDATA"))
                            byte1 = 12;
                        else if (s2.startsWith("SPDATA"))
                            byte1 = 9;
                        else if (s2.startsWith("USERAD"))
                            byte1 = 12;
                        else if (s2.startsWith("BLBD"))
                            byte1 = 7;
                        else if (s2.startsWith("SPORELR"))
                            byte1 = 6;
                        as = new String[byte1][];
                        for (int is2 = 0; is2 < byte1; is2++)
                            as[is2] = new String[j1];

                    }
                } else {
                    as[i1][k1] = s2;
                }
                if (++i1 == as.length) {
                    k1++;
                    byte0 = 0;
                }
            } else {
                if (s2.startsWith("ERROR")) {
                    F = s2;
                    return;
                }
                if (s2.startsWith("OBJECT")) {
                    byte0 = 1;
                    i1 = -1;
                } else if (s2.startsWith("INTEGER") || s2.startsWith("STRING"))
                    byte0 = 4;
                else if (s2.startsWith("ARRAY"))
                    byte0 = 2;
                else if (byte0 == 2)
                    byte0 = 3;
                else if (byte0 == 3) {
                    j1 = Integer.parseInt(s2);
                    k1 = 0;
                    if (j1 == 0)
                        return;
                } else if (byte0 == 4)
                    switch (t) {
                        case 114: // 'r'
                            B = s2;
                            break;

                        case 127:
                            super.mainThread.recordManager.E = s2;
                            break;

                        case 125:
                            super.mainThread.recordManager.G = s2;
                            break;

                        case 119:
                        case 130:
                            A = s2;
                            break;

                        case 124:
                        case 129:
                            F = s2;
                            break;
                    }
            }
        } while (l2 < s1.length());
        switch (t) {
            case 113: // 'q'
            case 114: // 'r'
            case 115: // 's'
            case 119:
            case 120: // 'x'
            case 121: // 'y'
            default:
                break;

            case 103: // 'g'
            case 104:
            case 105:
            case 106:
                d = new String[as.length][];
                a(as, d);
                return;

            case 107:
                for (int i2 = 0; i2 < 9; i2++)
                    d[i2][super.mainThread.ao] = as[i2][0];

                return;

            case 108: // 'l'
            case 109: // 'm'
            case 110: // 'n'
            case 111: // 'o'
            case 112: // 'p'
            case 117: // 'u'
            case 118:
                ao = new String[as.length][];
                a(as, ao);
                return;

            case 116: // 't'
                G = new String[as.length][];
                a(as, G);
                return;

            case 122: // 'z'
                try {
                    c = new String[2][];
                    for (int j2 = 0; j2 < 2; j2++)
                        c[j2] = new String[as[j2 + 1].length];

                    for (int k2 = 0; k2 < 2; k2++) {
                        System.arraycopy(as[k2 + 1], 0, c[k2], 0, as[k2 + 1].length);
                    }

                    return;
                }
                catch (IndexOutOfBoundsException _ex) {
                    return;
                }
                catch (NullPointerException _ex) {
                    return;
                }

            case 124:
                if (F == null) {
                    super.mainThread.recordManager.H = as[0][0];
                    super.mainThread.cq = new Vector();
                    return;
                }
                break;

            case 123:
                v = Integer.parseInt(as[1][0]);
                super.mainThread.recordManager.H = as[2][0];
                super.mainThread.cq = a(as[4][0], ',');
                Vector vector = a(as[5][0], ';');
                if (vector.isEmpty())
                    break;
                c = new String[2][];
                for (int l3 = 0; l3 < 2; l3++)
                    c[l3] = new String[vector.size()];

                for (int i4 = 0; i4 < vector.size(); i4++) {
                    int i3 = (s1 = (String) vector.elementAt(i4)).indexOf(',');
                    c[0][i4] = s1.substring(0, i3);
                    c[1][i4] = s1.substring(i3 + 1, s1.length());
                }

                break;
        }
    }

    private static Vector a(String s1, char c1) {
        Vector vector = new Vector();
        int i1 = 0;
        for (int j1 = s1.indexOf(c1, 0); j1 > 0; j1 = s1.indexOf(c1, i1)) {
            String si1 = s1.substring(i1, j1);
            vector.addElement(si1.trim());
            i1 = j1 + 1;
        }

        return vector;
    }

    private void n() {
        int i1 = super.mainThread.co.size();
        d = new String[9][];
        for (int j1 = 0; j1 < 9; j1++)
            d[j1] = new String[i1];

        for (int k1 = 0; k1 < i1; k1++) {
            d[4][k1] = (String) super.mainThread.co.elementAt(k1);
            d[1][k1] = super.mainThread.cp.elementAt(k1).toString();
        }

    }

    private void b(String s1) {
        E = cls_g.a(C.a(s1));
        C = new cls_g(E);
    }

    private void o() {
        E = D;
        C = new cls_g(E);
    }

    private String c(String s1) {
        return C.a(E.getBytes(), s1);
    }

    private void a(boolean flag) {
        super.mainThread.recordManager.J = false;
        d = null;
        c = null;
        super.mainThread.aX = false;
        super.mainThread.aY = false;
        if (flag) {
            super.mainThread.recordManager.z = "";
            super.mainThread.recordManager.x = "";
            super.mainThread.recordManager.K = false;
            if (super.mainThread.cq != null)
                super.mainThread.cq.removeAllElements();
        }
        super.mainThread.recordManager.persona = "";
        super.mainThread.recordManager.H = "";
        super.mainThread.recordManager.I = false;
        super.mainThread.recordManager.savePrefs();
    }

    private void p() {
        if (t == 102 || t == 119)
            super.mainThread.aX = true;
        else if (t == 121 || t == 120)
            super.mainThread.aY = true;
        int i1 = super.I.a.a;
        super.I.b(0);
        if (super.mainThread.recordManager.J) {
            byte byte0 = 39;
//            cls_ae ae1 = super.I;
            super.I.a(byte0, false);
        } else {
            a(!super.mainThread.recordManager.K);
            byte byte1 = 40;
//            cls_ae ae2 = super.I;
            super.I.a(byte1, false);
            if (i1 == 41) {
                byte byte2 = 41;
//                cls_ae ae3 = super.I;
                super.I.a(byte2, false);
            } else if (i1 == 43) {
                byte byte3 = 43;
                super.I.a(byte3, false);
            }
        }
        super.mainThread.aU = false;
        super.mainThread.J = false;
        super.mainThread.n();
    }

    private void q() {
        if (super.I.a.a == 60) {
            cls_h h1 = super.I.a;
            if ((new String(h1.B[0])).trim().length() > 0) {
                h1.fld_q_short = 3;
                return;
            }
            h1.fld_q_short = 6;
        }
    }

}